//
//  OutsideDoorViewController.m
//  Model
//
//  Created by YDJH on 2017/6/5.
//  Copyright © 2017年 YDJH. All rights reserved.
//

#import "OutdoorViewController.h"
#import "OutDoorView.h"
@interface OutdoorViewController ()

@property (nonatomic,strong)OutDoorView *outdoorView;

@end

@implementation OutdoorViewController

- (OutDoorView *)outdoorView {
    if (!_outdoorView) {
        _outdoorView = [[OutDoorView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.width)];
        _outdoorView.outdoor = _outdoor;
    }
    return _outdoorView;
}

- (void)setOutdoor:(HZOutDoor *)outdoor {
    _outdoor = outdoor;

}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    
    [self.view addSubview:self.outdoorView];
    self.outdoorView.center = self.view.center;
    
    
    UISwipeGestureRecognizer *swip = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(dissmiss)];
    swip.direction = UISwipeGestureRecognizerDirectionDown;
    [self.view addGestureRecognizer:swip];
    
    // Do any additional setup after loading the view.
}

- (void)dissmiss {
    
    [self dismissViewControllerAnimated:YES completion:nil];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
